package com.peng.my_rocketmq.bean;

import java.util.List;

import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
import org.apache.rocketmq.common.message.MessageExt;
import org.springframework.context.ApplicationEvent;

/**
 * 监听对象
 * @author 18011618
 *
 */
public class MessageEvent extends ApplicationEvent {
   private static final long serialVersionUID = -4468405250074063206L;
   private DefaultMQPushConsumer consumer;
   private List<MessageExt> msgs;
 
   public MessageEvent(List<MessageExt> msgs, DefaultMQPushConsumer consumer) throws Exception {
       super(msgs);
       this.consumer = consumer;
       this.setMsgs(msgs);
   }
 
 
 
   public DefaultMQPushConsumer getConsumer() {
       return consumer;
   }
 
   public void setConsumer(DefaultMQPushConsumer consumer) {
       this.consumer = consumer;
   }
   
   public List<MessageExt> getMsgs() {
       return msgs;
   }
 
   public void setMsgs(List<MessageExt> msgs) {
       this.msgs = msgs;
   }
}
